<div class="statistic-sales" [ngStyle]="tagData.cssStyle | styleFilter">

  <div *ngIf="tagData.headData && tagData.headData.length > 0" class="headData">
    <ng-container *ngFor="let h of tagData.headData;let i=index;">
      <ng-container *ngIf="h.submit!==undefined; else NotHasSubmitTemplate">
        <span class="headTitle" *ngIf="h.label" [ngClass]="{'style2': i===1,'style3': i===2}"
          appDebounceClick (debounceClick)="refreshData(h?.submit)">{{h?.label}}</span>
      </ng-container>
      <ng-template #NotHasSubmitTemplate>
        <span class="firstTitle style1" *ngIf="h.label">{{h?.label}}</span>
      </ng-template>
    </ng-container>
  </div>


  <div class="data-content" *ngFor="let item of tagData.data;let i = index;">
    <div class="item" [ngStyle]="item.itemCssStyle | styleFilter" [ngClass]="{'center': !item.count}" appDebounceClick (debounceClick)="openPage(tagData.link)">
      <img class="img" *ngIf="item.image" [ngStyle]="item.imageCssStyle | styleFilter" [src]="item.image" />
      <div class="item-left" [ngStyle]="item.itemLeftCssStyle | styleFilter">
        <span class="label" *ngIf="item.label" [ngStyle]="item.labelCssStyle | styleFilter">{{item.label}}</span>
        <span class="count" *ngIf="item.count" [ngStyle]="item.countCssStyle | styleFilter">{{item.count}}</span>
      </div>
      <div class="item-mid" *ngIf="item.midLabel" [ngStyle]="item.midLabelCssStyle | styleFilter">{{item.midLabel}}</div>
      <div class="item-right" [ngStyle]="item.rightBoxCssStyle | styleFilter">
        <span class="price" *ngIf="item.price" [ngStyle]="item.priceCssStyle | styleFilter">{{item.price}}</span>
        <img class="icon" *ngIf="item.icon" [ngStyle]="item.iconCssStyle | styleFilter" [src]="item.icon" />
      </div>
    </div>

    <div class="lineStyle" *ngIf="tagData.data?.length -1 !== i"></div>
  </div>

  <div class="noData" *ngIf="(tagData.data.length === 0)||(!tagData.data) && tagData.hint">
    <span>{{tagData.hint}}</span>
  </div>
</div>


<ion-infinite-scroll threshold="100px" (ionInfinite)="loadMoreData($event)" *ngIf="this.tagData.submit">
  <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="正在加载更多数据...">
  </ion-infinite-scroll-content>
</ion-infinite-scroll>